// app.js
App({
  onLaunch() {
    //小程序一启动，就会执行
    wx.cloud.init({
      env: 'software-engineering-8b09f312c1e' //云开发环境id
    })



    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null
  },

  onLoad(options) {
    var that = this
    wx.request({
      url: 'http://127.0.0.1:3000/',
      success: function (res) {
        console.log(res.data)
        // that.setData({ names: res.data })
      }
    })
  },

})